home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 401-425 / disk_415 / uedit / demo.urexx < prev    next >
Text File  |  1992-05-06  |  900b  |  56 lines

  1. /* demo.urexx */
  2.  
  3. /* tell AREXX that commands are to be sent to uedit */
  4. address 'URexx'
  5.  
  6. /* tell uedit to sent result strings back */
  7. options results
  8.  
  9. /* tell uedit to load 'demofile' */
  10. loadfile 'demofile'
  11.  
  12. /* try some cursor movement commands */
  13. down ; down ; down ; down
  14. right ; right ; right ; right
  15. up ; up ; up ; up
  16. left ; left ; left ; left
  17.  
  18.  
  19. /* find PART 2 */
  20. searchfor 'PART 2'
  21. if result = '' then 
  22. do 
  23.     ask "couldn't find PART 2"
  24.     exit 
  25. end
  26.  
  27. ask 'Delete these linesn?'
  28.  
  29. /* if requested, cut the next 3 lines */
  30. if result = 'YES'
  31. then do
  32.     down
  33.     sinvert
  34.     down;down;down;down
  35.     einvert
  36.     cut
  37. end
  38.  
  39. /* find PART 3 */
  40. searchfor 'PART 3'
  41. if result = '' then 
  42. do 
  43.     ask "couldn't find PART 3"
  44.     exit 
  45. end
  46.  
  47. /* add some new text to the file */
  48. down
  49. text 'Here is some new text' '0a'x
  50. text 'Just to show we can both add' '0a'x
  51. text 'and delete some lines'
  52.  
  53. searchfor 'THE END'
  54.  
  55. message 'Thats all folks'
  56.